<?php
class Core_Model_BaseAttack
	extends Core_Model_Abstract
	implements Core_Model_Score_Interface, 
				Core_Model_Object_Interface
{
	const OBJ_TYPE	= 'BaseAttack';
	
	const OBJ_DISP	= 'Base Attack';
	
	protected $id;
	
	protected $score	= 0;
	
	public function setScore($score)
	{
		$this->score	= (int) $score;
	}
	
	public function getScore()
	{
		return $this->score;
	}
	
	public function hasMultiple()
	{
		return $this->numberOfAttacks() > 1;
	}
	
	public function numberOfAttacks()
	{
		return floor(($this->score  - 1) / 5) + 1;
	}
	
	public function getAttacks()
	{
		$arr	= array();
		for($attack	= 0; $attack < $this->numberOfAttacks(); $attack++)
		{
			$arr[$attack]	= $this->score - (5 * $attack);
		}
		
		return $arr;
	}
	
	public function getObjectType()
	{
		return self::OBJ_TYPE;
	}
	
	public function getObjectDescp()
	{
		return self::OBJ_DISP;
	}
	
	public function setObjectId($id)
	{
		return;
	}
	
	public function loadObject()
	{
		return true;
	}	
}